package com.wteam.dragon.model.pojo.dto;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Set;

/**
 * @Author 陈晓辉
 * @Date 2020/4/1 19:56
 */
@Getter
@Setter
@TableName("user")
public class UserDto implements Serializable {

    @TableField(exist = false)
    private Set<JobSmallDto> jobs;

    @TableField(exist = false)
    private Set<RoleSmallDto> roles;

    @JsonInclude()
    @TableField(exist = false)
    private DeptSmallDto dept;

    @TableId(type = IdType.AUTO)
    private Long id;

    private String username;

    private String nickName;

    private String sex;

    private String avatar;

    private String email;

    private String phone;

    private Boolean enabled;

    @JsonIgnore
    private String password;

    private Date lastPasswordResetTime;

    private Long deptId;

    @TableLogic
    private Boolean isDelete;

    private Timestamp createTime;

    private String roleIdStr;
}
